import request from '@/utils/request'
import { get } from 'sortablejs'

// 查询班级信息列表
export function listClass(query) {
  return request({
    url: '/school/class/list',
    method: 'get',
    params: query
  })
}

// 查询课程列表
export function listSccourse(query) {
  return request({
    url: '/school/class/list',
    method: 'get',
    params: query
  })
}

// 查询班级信息详细
export function getClass(id) {
  return request({
    url: '/school/class/' + id,
    method: 'get'
  })
}

// 模糊查询课程
export function getCourseByName(query) { 
  return request({
    url: '/school/class/getCourseByName',
    method: 'get',
    params: query
  })
}

// 新增班级信息
export function addClass(data) {
  return request({
    url: '/school/class',
    method: 'post',
    data: data
  })
}

// 修改班级信息
export function updateClass(data) {
  return request({
    url: '/school/class',
    method: 'put',
    data: data
  })
}

// 删除班级信息
export function delClass(id) {
  return request({
    url: '/school/class/' + id,
    method: 'delete'
  })
}

// 导出班级信息
export function exportClass(query) {
  return request({
    url: '/school/class/export',
    method: 'get',
    params: query
  })
}